package cn.com.simple.learning.designpattern.behavior.mediator;

/**
 * @author Jianxing.Jia
 * @date 2022/2/9
 * @description 描述信息
 */
public class MediatorTest {
    public static void main(String[] args) {

        Broker broker = new Broker();

        Coffee coffee = new Coffee();
        broker.setCoffee(coffee);
        broker.onEvent(EventType.ALARM, false);

        Alarm alarm = new Alarm();
        broker.setAlarm(alarm);
        broker.onEvent(EventType.WEEKEND, true);
    }
}
